package week1.day5;

/**
 * @Author fengzihao
 * @Date 2024-04-19 19:35
 */
public class PracticeDebug {
    public static void main(String[] args) {
        Student student = new Student(30, "李四");
        System.out.println(student);
    }
}

class Student {
    int age = 10;
    String name = "张三";
    double a = 100;

    public Student(int age) {
        System.out.println("Student age");
        this.age = age;
    }

    public Student() {
    }

    public Student(int age, String name) {
        this(age);
        System.out.println("Student age,name");
        this.name = name;
    }

    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", name='" + name + '\'' +
                ", a=" + a +
                '}';
    }
}
